package cn.stylefeng.guns.modular.business.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.business.entity.BatchOrder;
import cn.stylefeng.guns.modular.business.model.params.BatchOrderParam;
import cn.stylefeng.guns.modular.business.model.params.BatchOrderQueryParam;
import cn.stylefeng.guns.modular.business.model.result.BatchOrderResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 批次订单 服务类
 * </p>
 *
 * @author jwj
 * @since 2019-09-09
 */
public interface BatchOrderService extends IService<BatchOrder> {

    /**
     * 新增
     *
     * @author jwj
     * @Date 2019-09-09
     */
    boolean add(BatchOrderParam param);


    /**
     * 新增
     *
     * @author jwj
     * @Date 2019-09-09
     */
    boolean processOrder(BatchOrderParam param);

    /**
     * 删除
     *
     * @author jwj
     * @Date 2019-09-09
     */
    void delete(BatchOrderParam param);

    /**
     * 更新
     *
     * @author jwj
     * @Date 2019-09-09
     */
    void update(BatchOrderParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author jwj
     * @Date 2019-09-09
     */
    BatchOrderResult findBySpec(BatchOrderParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author jwj
     * @Date 2019-09-09
     */
    List<BatchOrderResult> findListBySpec(BatchOrderParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author jwj
     * @Date 2019-09-09
     */
    LayuiPageInfo findPageBySpec(BatchOrderParam param);

    Page<BatchOrderResult> getMyBatchOrders(Page page, BatchOrderQueryParam batchOrderQueryParam);

}
